package com.example.test.mapper;

import com.example.test.bean.BaseOrders;
import com.example.test.bean.Users;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 管理员信息表 Mapper 接口
 * </p>
 *
 * @author dz
 * @since 2022-04-10
 */
@Mapper
public interface UsersMapper extends BaseMapper<Users> {
    //根据name查询基User表单
    @Select("SELECT\n" +
            "\tuser_id,\n" +
            "\tuser_name,\n" +
            "\tuser_nickname,\n" +
            "\tpassword,\n" +
            "\tuser_type\n" +
            "FROM\n" +
            "\tusers\n" +
            "WHERE\n" +
            "\tuser_nickname = #{userNickname}\n")
    Users getUserByNickname(String userNickname);
}
